<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>BLP2.0: CI_DB_utility Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">BLP2.0
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.8.0 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="classes.html"><span>Data&#160;Structure&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Data&#160;Fields</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div>
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Data Fields</a>  </div>
  <div class="headertitle">
<div class="title">CI_DB_utility Class Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="dynheader">
Inheritance diagram for CI_DB_utility:</div>
<div class="dyncontent">
 <div class="center">
  <img src="class_c_i___d_b__utility.png" usemap="#CI_DB_utility_map" alt=""/>
  <map id="CI_DB_utility_map" name="CI_DB_utility_map">
<area href="class_c_i___d_b__forge.html" alt="CI_DB_forge" shape="rect" coords="0,0,133,24"/>
<area href="class_c_i___d_b__cubrid__utility.html" alt="CI_DB_cubrid_utility" shape="rect" coords="143,112,276,136"/>
<area href="class_c_i___d_b__mssql__utility.html" alt="CI_DB_mssql_utility" shape="rect" coords="143,168,276,192"/>
<area href="class_c_i___d_b__mysql__utility.html" alt="CI_DB_mysql_utility" shape="rect" coords="143,224,276,248"/>
<area href="class_c_i___d_b__mysqli__utility.html" alt="CI_DB_mysqli_utility" shape="rect" coords="143,280,276,304"/>
<area href="class_c_i___d_b__oci8__utility.html" alt="CI_DB_oci8_utility" shape="rect" coords="143,336,276,360"/>
<area href="class_c_i___d_b__odbc__utility.html" alt="CI_DB_odbc_utility" shape="rect" coords="143,392,276,416"/>
<area href="class_c_i___d_b__pdo__utility.html" alt="CI_DB_pdo_utility" shape="rect" coords="143,448,276,472"/>
<area href="class_c_i___d_b__postgre__utility.html" alt="CI_DB_postgre_utility" shape="rect" coords="143,504,276,528"/>
<area href="class_c_i___d_b__sqlite__utility.html" alt="CI_DB_sqlite_utility" shape="rect" coords="143,560,276,584"/>
<area href="class_c_i___d_b__sqlsrv__utility.html" alt="CI_DB_sqlsrv_utility" shape="rect" coords="143,616,276,640"/>
</map>
 </div></div>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a095c5d389db211932136b53f25f39685"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_i___d_b__utility.html#a095c5d389db211932136b53f25f39685">__construct</a> ()</td></tr>
<tr class="memitem:a8486b247a8868504b055622cb2dd34d3"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_i___d_b__utility.html#a8486b247a8868504b055622cb2dd34d3">list_databases</a> ()</td></tr>
<tr class="memitem:ac0ba63aa14b19a37d4773fcc252bde81"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_i___d_b__utility.html#ac0ba63aa14b19a37d4773fcc252bde81">database_exists</a> ($database_name)</td></tr>
<tr class="memitem:a6aed9274f43b64eeee607d172b51529d"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_i___d_b__utility.html#a6aed9274f43b64eeee607d172b51529d">optimize_table</a> ($table_name)</td></tr>
<tr class="memitem:acb26598e177f525b39978f6dfca1f212"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_i___d_b__utility.html#acb26598e177f525b39978f6dfca1f212">optimize_database</a> ()</td></tr>
<tr class="memitem:a41a627004d26198c69bf466eef7eaeeb"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_i___d_b__utility.html#a41a627004d26198c69bf466eef7eaeeb">repair_table</a> ($table_name)</td></tr>
<tr class="memitem:aa5efaa0a8bac872775ec1c8247de4cdf"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_i___d_b__utility.html#aa5efaa0a8bac872775ec1c8247de4cdf">csv_from_result</a> ($query, $delim=&quot;,&quot;, $newline=&quot;\n&quot;, $enclosure= '&quot;') </td></tr>
<tr class="memitem:a09decb7db409060365ad2c20072523f9"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_i___d_b__utility.html#a09decb7db409060365ad2c20072523f9">xml_from_result</a> ($query, $params=array())</td></tr>
<tr class="memitem:abe2b9d47f950dfbaf8c6ec757a9af9a2"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_i___d_b__utility.html#abe2b9d47f950dfbaf8c6ec757a9af9a2">backup</a> ($params=array())</td></tr>
<tr><td colspan="2"><h2><a name="pub-attribs"></a>
Data Fields</h2></td></tr>
<tr class="memitem:a1fa3127fc82f96b1436d871ef02be319"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_i___d_b__utility.html#a1fa3127fc82f96b1436d871ef02be319">$db</a></td></tr>
<tr class="memitem:aab3007e30adbaf71d06218aa6c90e384"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_c_i___d_b__utility.html#aab3007e30adbaf71d06218aa6c90e384">$data_cache</a> = array()</td></tr>
</table>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a095c5d389db211932136b53f25f39685"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_c_i___d_b__utility.html#a095c5d389db211932136b53f25f39685">__construct</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Constructor</p>
<p>Grabs the CI super object instance so we can access it. </p>

<p>Reimplemented from <a class="el" href="class_c_i___d_b__forge.html#a095c5d389db211932136b53f25f39685">CI_DB_forge</a>.</p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="abe2b9d47f950dfbaf8c6ec757a9af9a2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_c_i___d_b__utility.html#abe2b9d47f950dfbaf8c6ec757a9af9a2">backup</a> </td>
          <td>(</td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"><em>params</em> = <code>array()</code></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Database Backup</p>
<p>public </p>
<dl class="section return"><dt>Returns:</dt><dd>void </dd></dl>

</div>
</div>
<a class="anchor" id="aa5efaa0a8bac872775ec1c8247de4cdf"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_c_i___d_b__utility.html#aa5efaa0a8bac872775ec1c8247de4cdf">csv_from_result</a> </td>
          <td>(</td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"><em>query</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"><em>delim</em> = <code>&quot;,&quot;</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"><em>newline</em> = <code>&quot;\n&quot;</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"><em>enclosure</em> = <code>'&quot;'</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Generate CSV from a query result object</p>
<p>public </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">object</td><td>The query result object </td></tr>
    <tr><td class="paramname">string</td><td>The delimiter - comma by default </td></tr>
    <tr><td class="paramname">string</td><td>The newline character - <br/>
 by default </td></tr>
    <tr><td class="paramname">string</td><td>The enclosure - double quote by default </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>string </dd></dl>

</div>
</div>
<a class="anchor" id="ac0ba63aa14b19a37d4773fcc252bde81"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_c_i___d_b__utility.html#ac0ba63aa14b19a37d4773fcc252bde81">database_exists</a> </td>
          <td>(</td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"><em>database_name</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Determine if a particular database exists</p>
<p>public </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">string</td><td></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>boolean </dd></dl>

</div>
</div>
<a class="anchor" id="a8486b247a8868504b055622cb2dd34d3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_c_i___d_b__utility.html#a8486b247a8868504b055622cb2dd34d3">list_databases</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>List databases</p>
<p>public </p>
<dl class="section return"><dt>Returns:</dt><dd>bool </dd></dl>

</div>
</div>
<a class="anchor" id="acb26598e177f525b39978f6dfca1f212"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_c_i___d_b__utility.html#acb26598e177f525b39978f6dfca1f212">optimize_database</a> </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Optimize Database</p>
<p>public </p>
<dl class="section return"><dt>Returns:</dt><dd>array </dd></dl>

</div>
</div>
<a class="anchor" id="a6aed9274f43b64eeee607d172b51529d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_c_i___d_b__utility.html#a6aed9274f43b64eeee607d172b51529d">optimize_table</a> </td>
          <td>(</td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"><em>table_name</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Optimize Table</p>
<p>public </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">string</td><td>the table name </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>bool </dd></dl>

</div>
</div>
<a class="anchor" id="a41a627004d26198c69bf466eef7eaeeb"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_c_i___d_b__utility.html#a41a627004d26198c69bf466eef7eaeeb">repair_table</a> </td>
          <td>(</td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"><em>table_name</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Repair Table</p>
<p>public </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">string</td><td>the table name </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>bool </dd></dl>

</div>
</div>
<a class="anchor" id="a09decb7db409060365ad2c20072523f9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_c_i___d_b__utility.html#a09decb7db409060365ad2c20072523f9">xml_from_result</a> </td>
          <td>(</td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"><em>query</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">$&#160;</td>
          <td class="paramname"><em>params</em> = <code>array()</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Generate XML data from a query result object</p>
<p>public </p>
<dl class="params"><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">object</td><td>The query result object </td></tr>
    <tr><td class="paramname">array</td><td>Any preferences </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns:</dt><dd>string </dd></dl>

</div>
</div>
<hr/><h2>Field Documentation</h2>
<a class="anchor" id="aab3007e30adbaf71d06218aa6c90e384"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">$data_cache = array()</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<a class="anchor" id="a1fa3127fc82f96b1436d871ef02be319"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">$db</td>
        </tr>
      </table>
</div>
<div class="memdoc">

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>/Applications/MAMP/htdocs/Workspace/blp2.0/system/database/<a class="el" href="_d_b__utility_8php.html">DB_utility.php</a></li>
</ul>
</div><!-- contents -->


<hr class="footer"/><address class="footer"><small>
Generated on Wed Mar 14 2012 15:49:55 for BLP2.0 by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.0
</small></address>

</body>
</html>
